export default defineAppConfig({
  lazyCodeLoading: 'requiredComponents',
  pages: [
    'pages/index/index',
    'pages/index/detail',
    'pages/index/search',
    'pages/index/chargeMap',
    'pages/mine/index',
    // 'pages/rate/index',
    // 'pages/coupons/index',
    // 'pages/wallet/index',
    // 'pages/order/index',
    // 'pages/products/index',
    // 'pages/products/detail',
    // 'pages/copartner/index',
    // 'pages/wallet/recharge',
    // 'pages/wallet/IntegralRecharge',
    // 'pages/wallet/withdraw',
    // 'pages/setting/index',
    // 'pages/setting/deal',
    // 'pages/setting/rule',
    // 'pages/aboutUs/index',
    // 'pages/guide/index',
    // 'pages/trade/index',
  ],
  subpackages: [
    {
      root: 'moduleA',
      pages: [
        'pages/rate/index',
        'pages/coupons/index',
        'pages/order/index',
        'pages/order/fleetOrder',
        'pages/order/bookOrder',
        'pages/products/index',
        'pages/products/detail',
        'pages/copartner/index',
        'pages/guide/index',
        'pages/trade/index',
        'pages/pile/index',
        'pages/charging/index',
        'pages/invoice/index',
        'pages/invoice/step2Index',
        'pages/invoice/invoiceForm',
      ]
    },
    {
      root: 'moduleB',
      pages: [
        'pages/wallet/index',
        'pages/wallet/recharge',
        'pages/wallet/IntegralRecharge',
        'pages/wallet/teamAccount',
        'pages/wallet/teamRecharge',
        'pages/wallet/withdraw',
        'pages/setting/index',
        'pages/setting/deal',
        'pages/setting/rule',
        'pages/aboutUs/index',
        'pages/cars/index',
        'pages/cars/add',
        'pages/fleetCars/index',
        'pages/fleetCars/add',
        'pages/bookCharge/index',
      ],
      // independent: true
    },
  ],
  plugins: {
    chooseLocation: {
      version: "1.0.1",
      provider: "wx63ffb7b7894e99ae",
    },
    // routePlan: {
    //   version: "1.0.19",
    //   provider: "wx50b5593e81dd937a",
    // },
  },
  permission: {
    "scope.userLocation": {
      desc: "将获取你的具体位置信息，用于推荐附近的充电站",
    },
  },
  requiredPrivateInfos:[
    "chooseLocation",
    "getLocation"
  ],
  window: {
    backgroundTextStyle: 'light',
    navigationBarBackgroundColor: '#fff',
    navigationBarTitleText: 'WeChat',
    navigationBarTextStyle: 'black'
  },
  tabBar: {
    custom: true,
    selectedColor: '#237AF5',
    list: [
      {
        pagePath: "pages/index/index",
        text: "首页",
        iconPath: "./assets/home.png",
        selectedIconPath: "./assets/homeActive.png",
      },
      {
        pagePath: "pages/mine/index",
        text: "我的",
        iconPath: "./assets/me.png",
        selectedIconPath: "./assets/meActive.png",
      },
    ],
  }
})
